//
// type.h
// Usage: Type define for NewLife kernel
// Create Date: 2007-08-09
// Creator: MaJiuyue
//
#ifndef	_TYPE_H_
#define	_TYPE_H_

typedef	unsigned long		u32;
typedef	unsigned short		u16;
typedef unsigned char		u8;
typedef signed long		s32;
typedef signed short		s16;
typedef signed char		s8;
typedef u32			addr_t;
typedef	u16			port_t;
typedef int			pid_t;
typedef u32			pde_t;
typedef u32			pte_t;

struct regs_t
{
	u32 gs, fs, es, ds;
	u32 edi, esi;
	u32 ebp, kernel_esp;
	u32 ebx, edx, ecx, eax;
	u32 retaddr;
	u32 eip, cs, eflags;
	u32 esp, ss;
};
enum REGS_INDEX {
	REGS_GS  = 0x0, REGS_FS  = 0x1, REGS_ES  = 0x2, REGS_DS  = 0x3,
	REGS_EDI = 0x4, REGS_ESI = 0x5, REGS_EBP = 0x6,
	REGS_EBX = 0x8, REGS_EDX = 0x9, REGS_ECX = 0xA, REGS_EAX = 0xB,
	REGS_EIP = 0xD, REGS_CS  = 0xE, REGS_EFLAGS = 0xF,
	REGS_ESP = 0x10, REGS_SS  = 0x11
};

#endif

